import 'package:flutterupdatedemo/update_entity.dart';

updateEntityFromJson(UpdateEntity data, Map<String, dynamic> json) {
	if (json['isForceUpdate'] != null) {
		data.isForceUpdate = json['isForceUpdate'];
	}
	if (json['updateContent'] != null) {
		data.updateContent = json['updateContent']?.toString();
	}
	if (json['updateUrl'] != null) {
		data.updateUrl = json['updateUrl']?.toString();
	}
	return data;
}

Map<String, dynamic> updateEntityToJson(UpdateEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['isForceUpdate'] = entity.isForceUpdate;
	data['updateContent'] = entity.updateContent;
	data['updateUrl'] = entity.updateUrl;
	return data;
}